#include <bits/stdc++.h>
using namespace std;

int num[1005] = {0};

int main() {
	int n;
	int min = 0X7fffffff;
	cin >> n;
	for (int i = 0; i < n; ++i) {
		cin >> num[i];
		if (num[i] < min) {
			min = num[i];
		}
	}
	cout << min;
	return 0;
}